﻿<%@ Control Language="C#" Inherits="Core.Web.Code.UI.Controls.DefaultBody" %>

<div class="ui-accordion">
    <asp:Repeater ID="rptModule" runat="server" OnItemDataBound="rptModule_ItemDataBound">
        <ItemTemplate>
            <h4 class="ui-accordion-header">
                <span class="ui-icon ui-icon-triangle-1-s"></span><span class="ui-accordion-header-title">
                    <%# Eval("Name")%></span>
            </h4>
            <div class="ui-accordion-content">
                <div class="ui-accordion-content-child">
                    <asp:Repeater ID="rptChildModule" runat="server" OnItemDataBound="rptChildModule_ItemDataBound">
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" class="table-content-main">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td width="65">
                                    <img src="UI/images/cm_logo_1.png" />
                                </td>
                                <td valign="top" width="413" style="padding-right: 50px;">
                                    <p>
                                        <b><a href="Thread.aspx?mid=<%# Eval("ID") %>">
                                            <%# Eval("Name")%></b> <span class="highlight">&nbsp;(<%# Eval("PostCount")%>)</a>
                                        </span>
                                    </p>
                                    <p>
                                        <%# Eval("Introduction")%></p>
                                    <p>
                                        <ul>
                                            <asp:Repeater ID="rptModuleManager" runat="server">
                                                <ItemTemplate>
                                                    <li><a href="#">
                                                        <%# Eval("NickName")%></a> </li>
                                                </ItemTemplate>
                                                <SeparatorTemplate>
                                                    <li>、</li>
                                                </SeparatorTemplate>
                                            </asp:Repeater>
                                        </ul>
                                    </p>
                                </td>
                                <td width="182">
                                    <span class="highlight">102 /
                                        <%# Eval("PostCount")%></span><!--历史最高/帖子总数-->
                                </td>
                                <td width="271" style="padding-right: 50px;">
                                    <p>
                                        <asp:Literal ID="ltrLastPost" runat="server"></asp:Literal></p>
                                    <!--最后的帖子-->
                                    <p>
                                        <asp:Literal ID="ltrLastCreateTime" runat="server"></asp:Literal></p>
                                </td>
                                <td>
                                    <asp:Literal ID="ltrLastUser" runat="server"></asp:Literal>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </div>
        </ItemTemplate>
    </asp:Repeater>
</div>

<script type="text/javascript">
    $('h4.ui-accordion-header').corner('4px').hover(function () {
        $(this).addClass('ui-accordion-header-hover');
    }, function () {
        $(this).removeClass('ui-accordion-header-hover');
    }).click(function () {
        $(this).children('span:first').toggleClass('ui-icon-triangle-1-e', 'ui-icon-triangle-1-s')
                .end().next('div.ui-accordion-content').corner('4px').animate({ height: 'toggle' }, 'normal');
    })
    $('table.table-content-main tr').each(function () {
        $(this).hover(function () {
            $(this).toggleClass('tr-hover');
        })
    })
</script>
